package logs

import (
	"log"
	"os"
)

// 设置日志级别颜色
const (
	blue   = "\033[34m" // 蓝色
	yellow = "\033[33m" // 黄色
	red    = "\033[31m" // 红色
	reset  = "\033[0m"  // 重置颜色
)

const (
	INFO = iota
	WARN
	ERROR
)

// 创建自定义的日志记录器
func newLogger(color string, prefix string) *log.Logger {
	return log.New(os.Stdout, color+prefix+reset+"\t", log.Ldate|log.Ltime)
}

var (
	info  = newLogger(blue, "[INFO ]")
	warn  = newLogger(yellow, "[WARN ]")
	error = newLogger(red, "[ERROR]")
)

var (
	Print   iPrint   = info.Print
	Println iPrintln = info.Println
	Printf  iPrintf  = info.Printf
)

func SetFlag() {

}
